﻿using System.Web;
using System.Web.Optimization;


namespace Web
{
    public class BundleConfig
    {
        // 有关绑定的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // 使用要用于开发和学习的 Modernizr 的开发版本。然后，当你做好
            // 生产准备时，请使用 http://modernizr.com 上的生成工具来仅选择所需的测试。
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/font-awesome.css",
                      "~/Content/slidebars.css",
                      "~/Content/site.css",
                      "~/Content/style-responsive.css",
                      "~/Content/bootstrap-reset.css"));
/************************************************自定义分页********************************************************/
            bundles.Add(new ScriptBundle("~/bundles/paged").Include(
                      "~/Scripts/jquery.pagination.js",
                      "~/Scripts/PaginationShow.js"));
            bundles.Add(new StyleBundle("~/Content/paged").Include(
                "~/Content/pagination.css"));

            bundles.Add(new StyleBundle("~/Content/fileUpload").Include(
                "~/Content/jquery.fileupload.css",
                "~/Content/jquery.fileupload-ui.css"));
/**************************************************文件上传********************************************************/
            bundles.Add(new ScriptBundle("~/bundles/fileupload").Include(
                "~/Scripts/fileupload/jquery.ui.widget.js",
                "~/Scripts/fileupload/load-image.all.min.js",
                "~/Scripts/fileupload/jquery.iframe-transport.js",
                "~/Scripts/fileupload/jquery.fileupload.js",
                "~/Scripts/fileupload/jquery.fileupload-ui.js",                
                "~/Scripts/fileupload/jquery.fileupload-process.js",
                "~/Scripts/fileupload/jquery.fileupload-image.js",
                "~/Scripts/fileupload/jquery.fileupload-video.js",
                "~/Scripts/fileupload/jquery.fileupload-audio.js",
                 "~/Scripts/fileupload/jquery.fileupload-validate.js"
                ));
/**************************************************表单序列化为JSON********************************************************/
            bundles.Add(new ScriptBundle("~/bundles/serializeJSON").Include(
               "~/Scripts/jquery.serializejson.min.js",//表单序列化为JSON
               "~/Scripts/String.js" //String 扩展，format、trimEnd、startsWith、endsWith、trim等
               ));

            BundleTable.EnableOptimizations = false;         
        }
    }
}
